环境
编辑 elasticsearch.yml 配置文件
123456789101112131415
# Set the bind address to a specific IP (IPv4 or IPv6):##network.host: 192.168.0.1# 1、指定自己的 IP 地址(内网或外网)network.host: 0.0.0.0# 2、设置节点名称node.name: node-1# 3、设置初始主节点cluster.initial_master_nodes: ["node-1"]# 4、设置跨域http.cors.enabled: truehttp.cors.allow-origin: "*"
参考文章